package com.zyy.decorator;

/**
 * @Description: 类描述
 * @Author: zyy
 * @Date: 2023/08/01 22:46
 */
public class Client {

    public static void main(String[] args) {
        //点一份炒饭
        FastFood firedRice = new FiredRice();
        System.out.println(firedRice.getDesc() + "-->" + firedRice.cost() + "元");

        //点一份加鸡蛋的炒饭
        FastFood eggFiredRice = new FiredRice();
        eggFiredRice = new Egg(eggFiredRice);
        System.out.println(eggFiredRice.getDesc() + "-->" + eggFiredRice.cost() + "元");

        //点一份加培根的炒面
        FastFood baconFiredNoodles = new FiredNoodles();
        baconFiredNoodles = new Bacon(baconFiredNoodles);
        System.out.println(baconFiredNoodles.getDesc() + "-->" + baconFiredNoodles.cost() + "元");

    }


}
